#!/usr/bin/env python
#  -*- coding:utf-8 -*-
# File http_post.py

import requests
import json

TIMES = 10
JSON_HEADER = {'content-type': 'application/json'}
def test(url,request,item):
	r = requests.post( url ,data = request, headers = JSON_HEADER )
	print "%s Done!\nResponse:%s"%(item,r.json());

#----------------------------------------------------------------------------------------------------------------------------------------------------------
def Student_Login_test():
	student_login_url='http://localhost/login/student'
	for i in range(1,TIMES):
		student_login_data = json.dumps( {'stu_number':'1234','stu_password':'1234'} ) #right
		test(student_login_url, student_login_data, "Student_Login")

		student_login_data = json.dumps( {'stu_number':'1234','stu_password':'12345'} ) #right
		test(student_login_url, student_login_data, "Student_Login")

def Teacher_Login_test():
	teacher_login_url='http://localhost/login/teacher'
	for i in range(1,TIMES):	
		teacher_login_data = json.dumps( {'teacher_number':'1234','teacher_password':'1234'} ) #right
		test(teacher_login_url, teacher_login_data, "Teacher_Login")
		
		teacher_login_data = json.dumps( {'teacher_number':'1234','teacher_password':'12345'} ) #right
		test(teacher_login_url, teacher_login_data, "Teacher_Login")


def Parent_Login_test():
	parent_login_url='http://localhost/login/parent'
	for i in range(1,TIMES):
		parent_login_data =json.dumps( {'stu_number':'1234','parent_password':'123456'} ) #right
		test(parent_login_url, parent_login_data, "Parent_Login")

		parent_login_data =json.dumps({'stu_number':'1234','parent_password':'12345'}) #wrong
		test(parent_login_url, parent_login_data, "Parent_Login")
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def Student_All_homework_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/stu_all'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse:%s"%("Student_Get_All_Homework",req2.json());

def Student_homework_scope_subject_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/stu_scope/subject'
	student_login_data =json.dumps({"subject_id" : 1 }) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)

	student_login_data =json.dumps({"subject_name" : "语文" }) #right
	req3 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s\n\nResponse2:%s"%("Student_Get_All_Homework",req2.json(),req3.json());

def Student_homework_scope_subject_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/stu_scope/subject'
	student_login_data =json.dumps({"subject_id" : 1 }) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)

	student_login_data =json.dumps({"subject_name" : "语文" }) #right
	req3 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s\n\nResponse2:%s"%("Student_Homework_scope_subject",req2.json(),req3.json());

def Student_homework_scope_hw_time_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/stu_scope/hw_time'
	student_login_data =json.dumps({"hw_time_l" : "1970-12-12 01:01:01" , "hw_time_r" : "2070-12-12 01:01:01"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse:%s"%("Student_Homework_scope_hw_time",req2.json());

def Student_homework_scope_hw_deadline_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/stu_scope/hw_deadline'
	student_login_data =json.dumps({"hw_deadline_l" : "1970-12-12 01:01:01" , "hw_deadline_r" : "2070-12-12 01:01:01"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse:%s"%("Student_Homework_scope_hw_deadline",req2.json());

def Teacher_homework_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/Teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/tea_all/'
	student_login_data =json.dumps({"class_id" : "1" }) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse:%s"%("Teacher_Homework_All",req2.json());

def Teacher_homework_scope_subject_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/Teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/tea_scope/subject'
	student_login_data =json.dumps({"class_id" : 1 , "subject_id" :1 }) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	student_login_data =json.dumps({"class_id" : 1 , "subject_name" : "语文" }) #right
	req3 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s\n\nResponse2:%s"%("Student_Homework_scope_subject",req2.json(),req3.json());

def Teacher_homework_scope_hw_time_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/Teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/tea_scope/hw_time'
	student_login_data =json.dumps({"class_id": 1 ,"hw_time_l" : "1970-12-12 01:01:01" , "hw_time_r" : "2070-12-12 01:01:01"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_Homework_scope_hw_time",req2.json());

def Teacher_homework_scope_hw_deadline_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/Teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/homework/tea_scope/hw_deadline'
	student_login_data =json.dumps({"class_id": 1 ,"hw_deadline_l" : "1970-12-12 01:01:01" , "hw_deadline_r" : "2070-12-12 01:01:01"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_Homework_scope_hw_deadline",req2.json());

def Teacher_homework_add_test():
	s = requests.Session();
	
	teacher_login_url='http://localhost/login/Teacher'
	teacher_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(teacher_login_url , data = teacher_login_data ,headers = JSON_HEADER)
	print req1.json()

	teacher_login_url='http://localhost/homework/tea_add'
	teacher_login_data =json.dumps({"class_id": 1 , "subject_id" : 1 , "hw_content" : "test","hw_time" : "1970-12-12 01:01:01" , "hw_deadline" : "2070-12-12 01:01:01"}) #right
	req2 = s.post(teacher_login_url , data = teacher_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_add_homework",req2.json());

def Teacher_homework_modify_test():
	s = requests.Session();
	
	teacher_login_url='http://localhost/login/Teacher'
	teacher_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(teacher_login_url , data = teacher_login_data ,headers = JSON_HEADER)
	print req1.json()

	teacher_login_url='http://localhost/homework/tea_modify'
	teacher_login_data =json.dumps({"hw_id": 1 , "hw_content" : "test"}) #right
	req2 = s.post(teacher_login_url , data = teacher_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_modify_homework",req2.json());

def Teacher_homework_del_test():
	s = requests.Session();
	
	teacher_login_url='http://localhost/login/Teacher'
	teacher_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(teacher_login_url , data = teacher_login_data ,headers = JSON_HEADER)
	print req1.json()

	teacher_login_url='http://localhost/homework/tea_del'
	teacher_login_data =json.dumps({"hw_id": 1}) #right
	req2 = s.post(teacher_login_url , data = teacher_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_del_homework",req2.json());
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def Student_score_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/stu_all'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_all",req2.json());

def Student_score_Get_scope_subject_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/stu_scope/subject'
	student_login_data =json.dumps({"subject_id": 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Student_score_Get_scope_score_year_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/stu_scope/score_year'
	student_login_data =json.dumps({"score_year_l": 1 , "score_year_r": 3000}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Teacher_score_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/tea_all'
	student_login_data =json.dumps({"stu_id": 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Teacher_score_Get_scope_subject_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/tea_scope/subject'
	student_login_data =json.dumps({"stu_id": 1,"subject_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Teacher_score_Get_scope_score_year_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/tea_scope/score_year'
	student_login_data =json.dumps({"stu_id":1,"score_year_l": 1,"score_year_r":10000}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Teacher_add_score_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/tea_add_score'
	student_login_data =json.dumps({"stu_id":1,"subject_id":1,"score":100,"score_semester":1,"score_year":2016}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Teacher_del_score_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/tea_del_score'
	student_login_data =json.dumps({"score_id":2}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());

def Teacher_modify_score_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/score/tea_modify_score'
	student_login_data =json.dumps({"score_id":2,"score":120}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_score_scope_subject",req2.json());
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

def Student_evaluate_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/stu_all'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_evaluate_all",req2.json());

def Student_evaluate_Get_scope_teacher_id_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/stu_scope/teacher_id'
	student_login_data =json.dumps({"teacher_id": 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_evaluate_scope_teacher_id",req2.json());

def Student_evaluate_Get_scope_evaluate_year_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/stu_scope/evaluate_year'
	student_login_data =json.dumps({"evaluate_year_l": 1 , "evaluate_year_r" : 10000}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_evaluate_scope_evaluate_year",req2.json());

def Teacher_evaluate_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/tea_all/'
	student_login_data =json.dumps({"stu_id" : 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_evaluate_all_year",req2.json());

def Teacher_evaluate_Get_scope_evaluate_year_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/tea_scope/evaluate_year'
	student_login_data =json.dumps({"stu_id":1,"evaluate_year_l" : 1,"evaluate_year_r":10000}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_evaluate_scope_evaluate_year",req2.json());

def Teacher_evaluate_Add_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/tea_add_evaluate'
	student_login_data =json.dumps({"stu_id":1\
					,"evaluate_content" : "123"\
					,"evaluate_semester" : 2\
					,"evaluate_time" 	: "1970-01-01 01:00:00"\
					,"evaluate_year"	:10000\
					}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_evaluate_add",req2.json());

def Teacher_evaluate_Del_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/tea_del_evaluate'
	student_login_data =json.dumps({"evaluate_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_evaluate_del",req2.json());

def Teacher_evaluate_Modify_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/evaluate/tea_modify_evaluate'
	student_login_data =json.dumps({"evaluate_id":1,"evaluate_content" : "12345"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_evaluate_modify",req2.json());
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def Student_honor_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/stu_all'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_honor_all",req2.json());

def Student_honor_Get_scope_type_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/stu_scope/by_type'
	student_login_data =json.dumps({"honor_type" : 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_honor_scope_type",req2.json());

def Student_honor_Get_scope_date_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/stu_scope/by_date'
	student_login_data =json.dumps({"honor_year": 2016}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_evaluate_scope_honor_date",req2.json());

def Teacher_honor_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/tea_all/'
	student_login_data =json.dumps({"stu_id" : 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_honor_all",req2.json());

def Teacher_honor_Get_scope_type_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/tea_scope/by_type'
	student_login_data =json.dumps({"stu_id":1,"honor_type" : 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_honor_scope_evaluate_type",req2.json());

def Teacher_honor_Add_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/tea_add_honor'
	student_login_data =json.dumps({"stu_id":1\
					,"honor_type" : 1\
					,"honor_content" : "123213"\
					,"honor_semester" : 1\
					,"honor_year"	:10000\
					}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_honor_add",req2.json());

def Teacher_honor_Del_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/tea_del_honor'
	student_login_data =json.dumps({"honor_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_honor_del",req2.json());

def Teacher_honor_Modify_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/honor/tea_modify_honor'
	student_login_data =json.dumps({"honor_id":1,"honor_type":1,"stu_id":1,"honor_content" : "12345","honor_semester" : 1, "honor_year":2016}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_honor_modify",req2.json());
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def Parent_communicate_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/parent'
	student_login_data =json.dumps({'stu_number':'1234','parent_password':'123456'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/communication/parent_get_all'
	student_login_data =json.dumps({"teacher_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Parent_communicate_Get_All",req2.json());

def Teacher_communicate_Get_All_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/communication/tea_get_all'
	student_login_data =json.dumps({"parent_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("teacher_communicate_Get_All",req2.json());

def Parent_communicate_Add_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/parent'
	student_login_data =json.dumps({'stu_number':'1234','parent_password':'123456'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/communication/parent_add_communication'
	student_login_data =json.dumps({"teacher_id":1\
					,"communication_type" : 1\
					,"communication_content" : "123213"\
					,"communication_time" : "1970-01-01 12:00:00"\
					}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Parent_communicate_Add",req2.json());

def Teacher_communicate_Add_test():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/communication/tea_add_communication'
	student_login_data =json.dumps({"parent_id":1\
					,"communication_type" : 1\
					,"communication_content" : "123213"\
					,"communication_time" : "1970-01-01 12:00:00"\
					}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_communicate_Add",req2.json());
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def Student_Check_Information():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Student_Check_Information'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_Check_Information",req2.json());

def Student_Modify_Password():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Student_Modify_Password'
	student_login_data =json.dumps({"stu_old_password":"1234","stu_password": "1234"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_Modify_Password",req2.json());

def Teacher_Check_Information():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Teacher_Check_Information'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_Check_Information",req2.json());
def Student_Find_Class():
	s = requests.Session();
	
	student_login_url='http://localhost/login/student'
	student_login_data =json.dumps({'stu_number':'1234','stu_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Student_Find_Class'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Student_Find_Class",req2.json());

def Teacher_Modify_Password():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Teacher_Modify_Password'
	student_login_data =json.dumps({"teacher_old_password":"1234","teacher_password": "1234"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_Modify_Password",req2.json());

def Teacher_Modify_Information():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Teacher_Modify_Information'
	student_login_data =json.dumps({"teacher_number":"1234","teacher_phone": "1234"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_Modify_Information",req2.json());

def Teacher_Find_Class():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Teacher_Find_Class'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_Find_Class",req2.json());

def Teacher_Find_Subject():
	s = requests.Session();
	
	student_login_url='http://localhost/login/teacher'
	student_login_data =json.dumps({'teacher_number':'1234','teacher_password':'1234'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Teacher_Find_Subject'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_Find_Subject",req2.json());

def Parent_Check_Information():
	s = requests.Session();
	
	student_login_url='http://localhost/login/parent'
	student_login_data =json.dumps({'stu_number':'1234','parent_password':'123456'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Parent_Check_Information'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Parent_Check_Information",req2.json());
def Parent_Modify_Password():
	s = requests.Session();
	
	student_login_url='http://localhost/login/parent'
	student_login_data =json.dumps({'stu_number':'1234','parent_password':'123456'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Parent_Modify_Password'
	student_login_data =json.dumps({"parent_old_password":"123456","parent_password": "123456"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Teacher_Modify_Password",req2.json());

def Parent_Modify_Information():
	s = requests.Session();
	
	student_login_url='http://localhost/login/parent'
	student_login_data =json.dumps({'stu_number':'1234','parent_password':'123456'}) #right
	req1 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print req1.json()

	student_login_url='http://localhost/common/Parent_Modify_Information'
	student_login_data =json.dumps({"parent_phone": "1234"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Parent_Modify_Information",req2.json());
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
def Notification_Get_All():
	s = requests.Session();

	student_login_url='http://localhost/notification/Notification_All'
	student_login_data =json.dumps({}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Notification_Get_All",req2.json());

def Notification_Check():
	s = requests.Session();

	student_login_url='http://localhost/notification/Notification_Check'
	student_login_data =json.dumps({"notification_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Notification_Check",req2.json());

def Picture_Get_All():
	s = requests.Session();

	student_login_url='http://localhost/notification/Picture_Get_All'
	student_login_data =json.dumps({"notification_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Picture_All",req2.json());

def Notification_Update():
	s = requests.Session();

	student_login_url='http://localhost/notification/Notification_Update'
	student_login_data =json.dumps({"notification_id": 1,"notification_name":"123", "notification_time":"2016-12-12 12:12:12"}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Notification_Update",req2.json());

def Notification_Type_Update():
	s = requests.Session();

	student_login_url='http://localhost/notification/Notification_Type_Update'
	student_login_data =json.dumps({"notification_id": 1,"notification_type_id":1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Notification__Type_Update",req2.json());

def Notification_Delete():
	s = requests.Session();

	student_login_url='http://localhost/notification//Notification_Delete'
	student_login_data =json.dumps({"notification_id": 1}) #right
	req2 = s.post(student_login_url , data = student_login_data ,headers = JSON_HEADER)
	print "%s Done!\nResponse1:%s"%("Notification_Update",req2.json());

def test_all():
#login module
	Student_Login_test()
	Teacher_Login_test()
	Parent_Login_test()
#homework module
	Student_All_homework_test()
	Student_homework_scope_subject_test()
	Student_homework_scope_hw_time_test()
	Student_homework_scope_hw_deadline_test()

	Teacher_homework_Get_All_test()
	Teacher_homework_scope_subject_test()
	Teacher_homework_scope_hw_time_test()
	Teacher_homework_scope_hw_deadline_test()
	Teacher_homework_add_test()
	Teacher_homework_modify_test()
	Teacher_homework_del_test()
#score module
	Student_score_Get_All_test()
	Student_score_Get_scope_subject_test()
	Student_score_Get_scope_score_year_test()
	Teacher_score_Get_All_test()
	Teacher_score_Get_scope_subject_test()
	Teacher_score_Get_scope_score_year_test()
	Teacher_add_score_test()
	Teacher_del_score_test()
	Teacher_modify_score_test()
#evaluate
	Student_evaluate_Get_All_test()
	Student_evaluate_Get_scope_teacher_id_test()
	Student_evaluate_Get_scope_evaluate_year_test()
	Teacher_evaluate_Get_All_test()
	Teacher_evaluate_Get_scope_evaluate_year_test()
	Teacher_evaluate_Add_test()	
	Teacher_evaluate_Del_test()
	Teacher_evaluate_Modify_test()
#honor
	Student_honor_Get_All_test()
	Student_honor_Get_scope_type_test()
	Student_honor_Get_scope_date_test()
	Teacher_honor_Get_All_test()
	Teacher_honor_Get_scope_type_test()
	Teacher_honor_Add_test()
	Teacher_honor_Modify_test()	
	Teacher_honor_Del_test()
#communicate
	Parent_communicate_Get_All_test()
	Teacher_communicate_Get_All_test()
	Parent_communicate_Add_test()
	Teacher_communicate_Add_test()
#common
	Student_Check_Information()
	Student_Modify_Password()
	Teacher_Check_Information()
	Student_Find_Class()
	Teacher_Modify_Password()
	Teacher_Modify_Information()
	Teacher_Find_Class()
	Teacher_Find_Subject()
	Parent_Check_Information()
	Parent_Modify_Password()
	Parent_Modify_Information()
#notification
	Notification_Get_All()
	Notification_Check()
	Picture_Get_All ()
	Notification_Update()
	Notification_Type_Update()
Notification_Delete()
#test_all()
